const {Service}=require("egg")

class setAdviewsService extends Service{

    // 获取;
    async getAdviews(type_id){
        const sql=`select * from auth_views,auth_identity_views where auth_views.views_id=auth_identity_views.views_id and auth_identity_views.type_id=?`
        return this.app.mysql.query(sql,[type_id])
    }

    // 设置;
    async create(id,type_id,views_id){
        const sql=`insert into auth_identity_views (identity_id,type_id,views_id) values (?,?,?)`
        return this.app.mysql.query(sql,[id,type_id,views_id])
    }
}

module.exports=setAdviewsService